package com.share.device.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.share.device.domain.Region;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RegionMapper extends BaseMapper<Region> {

    //根据上级code获取下级数据列表
    @Select("select * from `share-device`.region where parent_code = #{parentCode}")
    List<Region> selectByParentCode(String parentCode);
}
